﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MVCLD.Models.Article>" %>
<%@ Import Namespace="MVCLD.Settings" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Submit Your Article - <%= Settings.GeneralSiteName.ToString() %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h1>Submit Article</h1>
    <%= Html.ValidationSummary(true) %>
    <% using (Html.BeginForm()) {%>
        <fieldset>
            <legend>Fields</legend>
            
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleTitle) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.ArticleTitle) %>
                <%= Html.ValidationMessageFor(model => model.ArticleTitle) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleSnippet) %>
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.ArticleSnippet, 10, 40, new { @class = "ArticleSnippet"})%>
                <%= Html.ValidationMessageFor(model => model.ArticleSnippet) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleContent) %> (No HTML Allowed) - Min Word Count 
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.ArticleContent, 25, 40, new { @class = "ArticleContent" })%>
                <%= Html.ValidationMessageFor(model => model.ArticleContent) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Resource) %><strong>(Only BBCode Allowed)</strong>:<br />
                Links: [url=http://web.com] Name [/url]<br /> Bold: [b] bold [/b]<br /> Italic: [i] italic [/i]
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.Resource, 9, 40, new { @class = "ResourceArea" })%>
                <%= Html.ValidationMessageFor(model => model.Resource) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CategoryID) %>
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.CategoryID) %>
                <%= Html.ValidationMessageFor(model => model.CategoryID) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SubmitterName) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SubmitterName) %>
                <%= Html.ValidationMessageFor(model => model.SubmitterName) %>
            </div>

            <div class="editor-label">
                <%= Html.LabelFor(model => model.Email) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Email) %>
                <%= Html.ValidationMessageFor(model => model.Email) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleTypeID) %> (See below for details)
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.ArticleTypeID)%>
                <%= Html.ValidationMessageFor(model => model.ArticleTypeID) %>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div id="submissiontypes">
        <h2>Types of submissions</h2>
        <p>For any submissions that require payment, you will be transferred to paypal </p>
        <% foreach (var arttype in (IEnumerable<MVCLD.Models.ArticleType>)ViewData["ArticleTypes"])
           { %>
           <div class="arttypes">
            <h5><%=arttype.ArticleTypeName %></h5>
            <p><%= arttype.Notes %></p>
            <p><%= String.Format("Cost: {0:F}", arttype.Cost)%> (<%=ViewData["Cost"]%>)</p>
           </div>
        <% } %>
    </div>

</asp:Content>

